package com.huang;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

public class    Test {
    public static void main(String[] args) {
        CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> {
            return 1;
        }).thenCompose((t)->{
            return CompletableFuture.supplyAsync(()->{
            return null;
            });
        });
        System.out.println(future.join());
    }
}
